'use strict';

const Koa = require('koa');
const controller = require('./controller');
// const statics = require('koa-static');
const templating = require('./templating');
const staticController = require('./staticController');

// const model=require('./model');



// nun();
let app = new Koa();
// app.use(statics(__dirname + '/statics'));
app.use(staticController());
app.use(templating());

controller(app);

// model.sync().then(()=>{
//     // 这里可以初始化一些数据
// })

let port = 3000;
app.listen(port);
console.log(`服务运行于：http://localhost:${port}`);